﻿<%@ Page Language="C#" MasterPageFile="~/web.master" AutoEventWireup="true" CodeBehind="cluster_plan_add.aspx.cs" Inherits="Shuba.Web.master.cluster_plan_add"%>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
			<table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
				<tr>
					<td class="text bg_content" bgcolor="#FFFFFF" align="center"><p>&nbsp;</p>
			<table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
				<tr>
					<td class="title_back" align="left">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="30%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
                    </td>
					<td class="title_back" align="right">
					<a class="text" href="cluster_plan_list.aspx">Plan List</a>&nbsp;&nbsp;
					</td>				                            
				</tr>
				<tr>
					<td colspan="2" class="border_nobottom bg_subtitle_white">&nbsp; Insert / Update</td>
				</tr>
				<tr>
				<td colspan="2">
					<table class="black" border="0" width="100%" cellspacing="0" cellpadding="3">
                    <tr>
                        <td class="border_left border_right bg_grid2" colspan="4">&nbsp;</td>
                    </tr>
					<tr>
						<td class="border_left bg_grid" align="right" width="25%">TARGET YEAR</td>
						<td class="border_right bg_grid2" align="left" colspan="3">
						<asp:DropDownList ID="ddlYear" runat="server" CssClass="text" AutoPostBack=true OnSelectedIndexChanged="ddlYear_Change"></asp:DropDownList>&nbsp;
				    </tr>
				    <tr>
						<td class="border_left bg_grid" align="right">REGION</td>
						<td class="border_right bg_grid2" align="left" colspan="3">
						<asp:DropDownList ID="ddlRegion" runat="server" CssClass="text" AutoPostBack=true OnSelectedIndexChanged="ddlRegion_Change"></asp:DropDownList>
						</td>
					</tr>
                        <tr>
                            <td class="border_left border_right bg_grid2" colspan="4"><p>&nbsp;</p></td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGET YEAR</td>
						    <td class="border_right bg_grid2" align="left" colspan="3">
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <asp:Label ID="lblYear" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">REGION</td>
						    <td class="border_right bg_grid2" align="left" colspan="3">
                            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                            <ContentTemplate>
						        <asp:Label ID="lblRegion" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
                        </tr>
                        <tr>
                            <td class="border bg_grid" colspan="4">TOTAL ORIGINAL TARGET</td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED AMOUNT</td>
						    <td class="bg_grid2" align="left" width="250px">
                            <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                            <ContentTemplate>
    						    <asp:Label ID="lblAmount" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED AMOUNT</td>
						    <td class="border_right bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                            <ContentTemplate>
						    <asp:Label ID="lblAmountCluster" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED NOA</td>
						    <td class="bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel6" runat="server">
                            <ContentTemplate>
    						    <asp:Label ID="lblNoa" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED NOA</td>
						    <td class="border_right bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                            <ContentTemplate>
    						    <asp:Label ID="lblNoaCluster" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
                        </tr>
                        <tr>
                            <td class="border bg_grid" colspan="4">TOTAL REAL TARGET</td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED AMOUNT</td>
						    <td class="bg_grid2" align="left" width="150px">
                            <asp:UpdatePanel ID="UpdatePanel8" runat="server">
                            <ContentTemplate>
    						    <asp:Label ID="lblAmountReal" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
						    <td class="bg_grid2" align="right" width="150px">ASSIGNED AMOUNT</td>
						    <td class="border_right bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel9" runat="server">
                            <ContentTemplate>
						    <asp:Label ID="lblAmountClusterReal" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
                        </tr>
                        <tr>
						    <td class="border_left bg_grid2" align="right">TARGETED NOA</td>
						    <td class="bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel10" runat="server">
                            <ContentTemplate>
    						    <asp:Label ID="lblNoaReal" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
						    <td class="bg_grid2" align="right">ASSIGNED NOA</td>
						    <td class="border_right bg_grid2" align="left">
                            <asp:UpdatePanel ID="UpdatePanel11" runat="server">
                            <ContentTemplate>
    						    <asp:Label ID="lblNoaClusterReal" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
					        </asp:UpdatePanel>
						    </td>
                        </tr>
                                                
                    <tr>
                    <td class="border" colspan="4">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>					
	                    <cc:SHUBAGrid ID="gvList" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="ClusterID"
	                    OnRowDataBound="gvList_RowDataBound">
                        <Columns>
                            <asp:BoundField DataField="ClusterID" HeaderText="CLUSTER CODE" SortExpression="ClusterID" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign=Center />
                            <asp:BoundField DataField="ClusterName" HeaderText="NAME" SortExpression="ClusterName" HeaderStyle-Width="20%" HeaderStyle-HorizontalAlign=Center ItemStyle-HorizontalAlign=Left />
                            <asp:TemplateField HeaderText="TARGET AMOUNT ORIG." HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
                                <ItemTemplate>
					                <asp:TextBox ID="txtTargetAmount" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=12 CssClass="text" Text=<%# DataBinder.Eval (Container.DataItem, "TargetAmount")%> runat="server"></asp:TextBox>
					                <asp:RangeValidator ID="RangeValidatorAmount" runat="server" CssClass="text" Text="*" ErrorMessage="Amount" ControlToValidate="txtTargetAmount" Type=Double MinimumValue="0"></asp:RangeValidator>
					            </ItemTemplate>
					        </asp:TemplateField>
					        <asp:TemplateField HeaderText="TARGET NOA ORIG." HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
					            <ItemTemplate>
					                <asp:TextBox ID="txtNoa" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=8 CssClass="text" runat="server" Text=<%# DataBinder.Eval (Container.DataItem, "Noa")%>></asp:TextBox>
					                <asp:RangeValidator ID="RangeValidatorNoa" runat="server" CssClass="text" Text="*" ErrorMessage="NOA" ControlToValidate="txtNoa" Type=Double MinimumValue="0"></asp:RangeValidator>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="TARGET AMOUNT REAL" HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
                                <ItemTemplate>
					                <asp:TextBox ID="txtTargetAmountReal" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=12 CssClass="text" Text=<%# DataBinder.Eval (Container.DataItem, "TargetAmountReal")%> runat="server"></asp:TextBox>
					                <asp:RangeValidator ID="RangeValidatorAmountReal" runat="server" CssClass="text" Text="*" ErrorMessage="Amount" ControlToValidate="txtTargetAmountReal" Type=Double MinimumValue="0"></asp:RangeValidator>
					            </ItemTemplate>
					        </asp:TemplateField>
					        <asp:TemplateField HeaderText="TARGET NOA REAL" HeaderStyle-HorizontalAlign=Left ItemStyle-HorizontalAlign=Left>
					            <ItemTemplate>
					                <asp:TextBox ID="txtNoaReal" ValidationGroup="CtrlToValidate" Columns=12 MaxLength=8 CssClass="text" runat="server" Text=<%# DataBinder.Eval (Container.DataItem, "NoaReal")%>></asp:TextBox>
					                <asp:RangeValidator ID="RangeValidatorNoaReal" runat="server" CssClass="text" Text="*" ErrorMessage="NOA" ControlToValidate="txtNoaReal" Type=Double MinimumValue="0"></asp:RangeValidator>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                        </Columns>
                        <PagerSettings Mode="Numeric" Visible="true" />
                        <EmptyDataTemplate>
                            <table class="text" width=100% cellpadding=0 cellspacing=0><tr><td class="bg_grid2" align=center>NO RECORD FOUND</td></tr></table>
                        </EmptyDataTemplate>
                    </cc:SHUBAGrid>
				    <!-- Error Message -->
				    <table runat=server visible=false id="ErrBox" class="border" border="0" width="100%" cellspacing="0" cellpadding="2">
				    <tr>
				    <td class="bg_grid2" align=center><asp:Label ID="ErrMsg" runat="server" Text="" Font-Bold=true ForeColor="Red"></asp:Label></td>
				    </tr>
				    </table>
				    <!-- End Of Error Message -->
                    </td>
                </tr>
                </table>
                </ContentTemplate>
                <Triggers>
                <asp:AsyncPostBackTrigger ControlID="ddlRegion" EventName="SelectedIndexChanged"/>
                </Triggers>
                </asp:UpdatePanel>
					
				</td></tr>
				<tr>
				<td class="border bg_footer" colspan="2" align=right>
                    <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="buttonsmall" onclick="btnSubmit_Click" />
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="buttonsmall" CausesValidation="false" onclick="btnCancel_Click" />
						&nbsp; &nbsp; </td></tr>
			</table>
			
			<!-- VALIDATION MESSAGE -->
			<asp:ValidationSummary ID="ValidationSummary1" HeaderText="Invalid Entry On:"
            ShowMessageBox="true"
            ShowSummary="false"
            EnableClientScript="true"
            runat="server" />
			
			<p align=center>&nbsp;</p>
			
					</td>
				</tr>
</table>
</asp:Content>
